//
//  AY_BaseViewController.m
//  AiYue
//
//  Created by mac on 2023/10/9.
//

#import "AY_BaseViewController.h"

@interface AY_BaseViewController ()

@end

@implementation AY_BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    // 统一设置导航栏样式
    GKNavigationBarConfigure *configure = [GKNavigationBarConfigure sharedInstance];
    [configure setupDefaultConfigure];
    // 设置自定义样式
//    configure.titleColor = COLOR(@"191919");
//    configure.titleFont = [UIFont fontWithName:@"SourceHanSerifCN-Heavy" size:YNUM(18)];
    configure.backStyle = GKNavigationBarBackStyleBlack;
    self.gk_navLineHidden = YES;
    
    self.gk_navBackgroundColor = [UIColor whiteColor];
    self.view.backgroundColor = COLOR_Bg;
    
    if (self.gk_navLeftBarButtonItem != nil) {
    
      /* 返回按钮 */
      [self showBackBtn];
    }
}

- (void)barStyleBlack {
    if (@available(iOS 13.0, *)) {
        [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDarkContent;
    } else {
        [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
    }
}

- (void)barStyleLight {
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
}

#pragma 左上角返回按钮
- (void)showBackBtn {
    self.gk_navLeftBarButtonItem = [UIBarButtonItem itemWithTitle:nil image:YImage(@"AY_nav_pop") target:self action:@selector(popVC)];

}

-(void)popVC{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}
@end
